package com.frame.config.dubbo;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import com.alibaba.dubbo.config.spring.ServiceBean;
import com.frame.dubbo.DubboBaseConfig;
import com.frame.service.common.UserCommonService;
import com.frame.service.common.impl.UserCommonServiceImpl;

/**
 * 服务提供
 * @author Flying
 * 
 */
@Configuration
public class ProviderServiceConfig extends DubboBaseConfig {
    
    @Bean
    public ServiceBean<UserCommonService> personServiceExport(UserCommonServiceImpl sysmsService) {
        ServiceBean<UserCommonService> serviceBean = new ServiceBean<UserCommonService>();
        serviceBean.setVersion(version);
        serviceBean.setInterface(UserCommonService.class.getName());
        serviceBean.setRef(sysmsService);
        serviceBean.setTimeout(5000);
        serviceBean.setRetries(3);
        return serviceBean;
    }

}